<%-- 
    Document   : listAmbulance
    Created on : 3 Jan, 1980, 4:46:30 PM
    Author     : sagar
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="../common/script.jsp" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@include file="../common/title.jsp" %>
    </head>
    <body>
        <%@include file="../common/header.jsp" %>
        <%@include file="../common/menu.jsp" %>
        <div class="in_02">
            <%@include file="../common/message.jsp" %>

            &nbsp;&nbsp;&nbsp;
            <sec:authorize ifAnyGranted="ROLE_BF_AMBULANCE_ADD">
                <span style="font-size: 15px; font-weight: bold;"><a href="../ambulance/addAmbulance.htm">Add ambulance</a></span>
            </sec:authorize>
            <br/><br/>
            &nbsp;&nbsp;&nbsp;&nbsp;<Strong style="margin: 0 50px 0 0"><spring:message code="title.ambulanceList"/></strong>
            <span style=" float: right;margin-right:10px;">    <c:out value="${fn:length(ambulanceList)}"/> <spring:message code="rowsFound"/></span>
            <table border="1px" class="data_table">
                <tr class="header">

                    <th align="center" width="20%"><spring:message code="companyName"/></th>
                    <th align="center" width="10%"><spring:message code="contact1"/></th>
                    <th align="center" width="10%"><spring:message code="contact2"/></th>
                    <th align="center" width="10%"><spring:message code="contact3"/></th>
                    <th align="center" width="50%"><spring:message code="notes"/></th>
                    <sec:authorize ifAnyGranted="ROLE_BF_AMBULANCE_EDIT">
                        <th>&nbsp;</th>
                    </sec:authorize>
                </tr>
                <c:forEach items="${ambulanceList}" var="userItem">
                    <tr>
                        <td align="center"><c:out value="${userItem.companyName}"/></td>
                        <td align="center"><c:out value="${userItem.contact1}"/></td>
                        <td align="center"><c:out value="${userItem.contact2}"/></td>
                        <td align="center"><c:out value="${userItem.contact3}"/></td>
                        <td align="center"><c:out value="${userItem.notes}"/></td>
                        <sec:authorize ifAnyGranted="ROLE_BF_AMBULANCE_EDIT">
                            <td><a href="updateAmbulance.htm?ambulanceId=<c:out value="${userItem.ambulanceId}"/>"><img src="../images/edit.png"  width="20" height="20" style="border: none" alt="Edit" title="Edit"/></a></td>
                                </sec:authorize>
                    </tr>
                </c:forEach>
            </table>
            &nbsp;&nbsp;&nbsp;&nbsp;<c:out value="${fn:length(ambulanceList)}"/> <spring:message code="rowsFound"/>
            <br/><br/> &nbsp;&nbsp;&nbsp;
            <sec:authorize ifAnyGranted="ROLE_BF_AMBULANCE_ADD">
                <span style="font-size: 15px; font-weight: bold;"><a href="../ambulance/addAmbulance.htm">Add ambulance</a></span>
            </sec:authorize>


        </div>
    </body>
</html>